// element references
var usrnme = $("#usrnme");
var psswrd = $("#psswrd");
var selthm = $("#selthm");
var okbutn = $("#okbutn");
// helper functions
function login() {
	var usr = {
		username : usrnme.val(),
		theme : selthm.val(),
		password : psswrd.val()
	};
	AcessoFacade.login(usr, {
		callback : function(ret) {
			window.location.reload();
		}
	});
}
// events
okbutn.click(login);
$("input").keyup(function(event) {
	if (event.keyCode == 13)
		login();
});
// basic setup
$("button").button();